package sym.qrcode;

import sym.qrcode.common.BitMatrix;

import java.util.Hashtable;

public interface Writer {

	/**
	 * Encode a barcode using the default settings.
	 * 
	 * @param contents
	 *            The contents to encode in the barcode
	 * @param width
	 *            The preferred width in pixels
	 * @param height
	 *            The preferred height in pixels
	 * @return The generated barcode as a Matrix of unsigned bytes (0 == black,
	 *         255 == white)
	 */
	BitMatrix encode(String contents, int width, int height)
			throws WriterException;

	/**
	 * 
	 * @param contents
	 *            The contents to encode in the barcode
	 * @param width
	 *            The preferred width in pixels
	 * @param height
	 *            The preferred height in pixels
	 * @param hints
	 *            Additional parameters to supply to the encoder
	 * @return The generated barcode as a Matrix of unsigned bytes (0 == black,
	 *         255 == white)
	 */
	BitMatrix encode(String contents, int width, int height, Hashtable hints)
			throws WriterException;

}
